<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
			+ request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
	<head>
		<s:head />
		<s:i18n name="globalMessages"></s:i18n>
		<base href="<%=basePath%>" />
		<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
		<title></title>
		<script type='text/javascript' src='js/jquery-1.4.2.min.js'></script>
		<script type='text/javascript' src='js/jquery.validate.min.js'></script>
		<script type='text/javascript' src='js/common.js'></script>
		<script type='text/javascript' src='js/jquery-ui-1.7.3.custom.min.js'></script>  
		<link href="style/ui-lightness/jquery-ui-1.7.3.custom.css" rel="stylesheet" type="text/css">
		<link href="style/index.css" rel="stylesheet" type="text/css" />
		<link href="style/valid.css" rel="stylesheet" type="text/css" />
		<link href="images/css.css"  rel="stylesheet" type="text/css" />
		<link href="manage/manage.css" rel="stylesheet" type="text/css">
			<style type="text/css">
				a:link {
					text-decoration: none;
				}
				a:visited {
					text-decoration: none;
				}
				a:hover {
					text-decoration: none;
				}
				a:active {
					text-decoration: none;
				}
				.STYLE10 {
					font-size: 14px;
					font-weight: bold;
				}
		</style>
		<script type=text/javascript>
		function initYulan() {
			var arr = $(".yulancls");
			$.each( arr, function(i, el){
				 var divHeight = $(".zhenshu" + $(el).attr("msgid")).length * 240;
				 $(el).dialog({title:"彩信预览", resizable:false,  width: divHeight,autoOpen: false});
			}); 
			
		}

		 //预览
		   function previewMsg(idx) {
			   $("#yulanDiv" + idx).dialog('open');
		   }

		   function openYulan(msgid) {
		   }
		</script>
	</head>
<body  bgcolor="#F1F1F1" style="margin:0px; text-align:center;">
<table border="0" align="center" cellpadding="0" cellspacing="0">
  <tr><td width="794">
<table width="794" height="267" border="0" cellpadding="0" cellspacing="0" bgcolor="#FFFFFF" style="border:1px solid #C5C5C5;">
<tr>
        <td width="480" height="113"><img src="images/sylz1.jpg" width="480" height="113" /></td>
        <td width="312" rowspan="2"><img src="images/sylz.jpg" width="312" height="261" /></td>
  </tr>
      <tr>
        <td align="center"><table width="402" height="100%" border="0" cellpadding="0" cellspacing="0">
            <tr>
              <td height="30px;" width="82" align="right">登录账户：</td>
              <td width="147" align="left"> <s:property value="#session.userObject.account"/> </td>
              <td width="83" align="right">用户姓名：</td>
              <td width="90" align="left"><s:property value="#session.userObject.userName"/></td>
            </tr>
            <tr>
              <td  height="30px;" align="right">账号类别：</td>
              <td align="left">
              	 <s:if test="#session.userObject.type==0">
            	 	普通会员<a href="pay.jsp">升级为VIP</a>	
            	 </s:if>
            	 <s:else>
            	 	VIP会员
            	 </s:else> 
              </td>
              <td align="right">所属公司：</td>
              <td align="left"><s:property value="#session.userObject.company.companyName"/></td>
            </tr>
            <tr>
              <td  height="30px;" align="right">账号余额：</td>
              <td align="left">
              	<span class="STYLE7 STYLE12"><s:property value="#session.userObject.msgCnt"/>条
              	<a href="pay.jsp"><span class="di_ys">账户充值</span></a>
              </td>
              <td align="right">手机号码：</td>
              <td align="left"><s:property value="#session.userObject.account"/></td>
            </tr>
            
            <s:if test="#session.userObject.type==0">
            <tr>
              <td height="44" align="right" valign="top" class="STYLE12" style="line-height:23px;">温磬提示：</td>
            <td colspan="3" align="left" class="STYLE12" style="line-height:23px; vertical-align: top;">普通会员仅能使用“客户关怀”板块应用<br>
                预充值200元以上（含200元）便可升级为VIP用户VIP会员可以使用易彩通所有版块应用</td>
            </tr>
            </s:if>
        </table></td>
      </tr>
</table>
      <table width="100%" border="0" cellspacing="0" cellpadding="0">
        <tr>
          <td><img src="images/line4.jpg" width="5" height="14" /></td>
        </tr>
      </table>
      <table width="794" height="220" border="0" cellpadding="0" cellspacing="0" bgcolor="#F1F1F1">
      
      
      <!-- 开始循环 -->
      	<s:iterator value="typeMsgList" id="typeItem" status="st">
      	<s:if test="#typeItem.manageMsgs!=null  && #typeItem.manageMsgs.size()>0">
        <tr>
          <td height="220" align="center" valign="top" bgcolor="#FFFFFF" style="border:1px solid #C5C5C5; padding:1px ;"><table width="100%" height="32" border="0" cellpadding="0" cellspacing="0">
              <tr>
                <td width="1%" height="32" background="images/sp_bg.jpg">&nbsp;</td>
                <td width="3%" align="center" background="images/sp_bg.jpg" style="border-bottom:1px solid #C5C5C5;"><img src="images/dian.jpg" width="10" height="16" /></td>
                <td width="90%" align="left" background="images/sp_bg.jpg" style="border-bottom:1px solid #C5C5C5;"><span class="STYLE3" >${typeItem.name} </span></td>
                <td width="6%" align="left" background="images/sp_bg.jpg">
                	<s:if test="#typeItem.manageMsgs.size>5">
                	<a href="indexAction!findByTypeAndGroup.action?typeId=${typeItem.id }"><img src="images/more.jpg" width="38" height="12" border="0" /></a>
                	</s:if>
                </td>
              </tr>
            </table>
              <table width="100%" border="0" cellspacing="0" cellpadding="0">
                <tr>
                  <td height="8">&nbsp;</td>
                </tr>
              </table>
            <table  border="0" cellpadding="0" cellspacing="0" align="left">
                <div id="images2">
                  <tr>
                  	<s:iterator value="#typeItem.manageMsgs" id="msg" status="msgSt" >
                  	<s:if test="#msgSt.index<5">
                    	<td width="150" height="85" align="center"> 
                    		<s:if test="#msg.manageMsgDetails ==null || #msg.manageMsgDetails.size()==0 || #msg.manageMsgDetails[0]==null || #msg.manageMsgDetails[0].pic == null || #msg.manageMsgDetails[0].pic ==''">
                    			<img src="images/default_msg_pic.jpg"  style="height: 106px;width: 126px;"/>
                    		</s:if>
                    		<s:else>
                    				<img src="<s:property value="#msg.manageMsgDetails[0].pic"/>"  style="height: 106px;width: 126px;"/>
                    		</s:else>
                    	</td>
                    </s:if>
                    </s:iterator>
                  </tr>

                  <tr>
                  	<s:iterator value="#typeItem.manageMsgs" id="msg" status="msgSt">
                  	<s:if test="#msgSt.index<5">
                    	<td height="24" align="left"><div class="STYLE11 texthide" style="height:30px; width:120px;text-align: center;padding-left: 5px;">${msg.title}</div></td>
                    </s:if>
                    </s:iterator>
                  </tr>
                  
                  
                  <tr >
                  	<s:iterator value="#typeItem.manageMsgs" id="msg" status="msgSt">
                  	<s:if test="#msgSt.index<5">
                    	<td align="left" class="di_ys " ><div style="padding-left: 20px;">
                    		<s:if test="#msg.canSend">
				      				<a href="msg!sendPage.action?first=1&mubanId=${msg.id}">发送</a>&nbsp;&nbsp;&nbsp;&nbsp;
				      		</s:if>
                    		<a href="mobanListAction!yulan.action?id=${msg.id }" target="_blank">预览</a>&nbsp;&nbsp;&nbsp;&nbsp;</div>
                    	</td>
                    </s:if>
                    </s:iterator>
                  </tr>
                </div>
            </table></td>
        </tr>
        
        </s:if>
        </s:iterator>
      </table>
      
      
      <table width="200" border="0" cellspacing="0" cellpadding="0" height="7">
        <tr>
          <td></td>
        </tr>
      </table>
     
      </td></tr></table>
      
      
<s:iterator value="typeMsgList" var="typeItem" status="typeSt">      
<s:iterator value="#typeItem.manageMsgs" var="msg" status="st">
<!-- 预览效果的div -->
<div id="yulanDiv${msg.id}"  msgid="${msg.id}" style="display: none;" class="yulancls">
	<table cellspacing="0" cellpadding="0" border="0">
		<tr>
			<s:iterator var="item" value="#msg.manageMsgDetails">
			
			<td>
				<table cellspacing="0" cellpadding="0" border="0" width="216" height="424">
					        <tbody><tr>
					          <td align="center" width="216" valign="top" height="424"><table cellspacing="0" cellpadding="0" border="0" width="206" height="424">
					            <tbody><tr>
					              <td height="55" colspan="3"><img width="217" height="75" src="images/z_top.jpg"></td>
					            </tr>
					            <tr>
					              <td width="19" height="273"><img width="18" height="275" src="images/z_left.jpg"></td>
					              <td width="182" valign="top"><table cellspacing="0" cellpadding="0" border="0" align="center" width="181"  >
					                  <tbody><tr>
					                    <td width="185" height="140">
					                    	<s:if test="#item==null || #item.pic==null">
					                    		<img width="181" height="153" src="images/zlzjpg.jpg">
					                    	</s:if>
					                    	<s:else>
					                    		<img  width="181" height="153" src="<s:property value="#item.pic"/>" />
					                    	</s:else>
					                    </td>
					                  </tr>
					                  <tr>
					                    <td height="117">
					                    <s:if test="#item==null || #item.txt == null || #item.txt==''">
				                    		<textarea style="border:0px; height:115px;  width:181px; color:#000000;" disabled="disabled" cols="30" name="grjj">彩信文字内容</textarea>
				                    	</s:if>
				                    	<s:else>
						                    <textarea disabled="disabled" style="border:0px; height:115px;  width:181px; color:#000000;" cols="30" name="grjj"><s:property value="#item.txt"/></textarea>
					                    </s:else>
					                    
						          </td>
					                  </tr>
					              </tbody></table></td>
					              <td width="16"><img width="16" height="275" src="images/z_right.jpg"></td>
					            </tr>
					            <tr>
					              <td height="74" colspan="3"><img width="217" height="74" src="images/z_end.jpg"></td>
					            </tr>
					          </tbody></table></td>
					        </tr>
					      </tbody>
				</table>
			</td>
			</s:iterator>
			
		</tr>
		<tr>
			<s:iterator var="item2" value="#msg.manageMsgDetails">
			<td align="center" class="zhenshu${msg.id}">
				第${item2.zhenNo}帧
			</td>
			</s:iterator>
		</tr>
	</table>
</div>
</s:iterator>
</s:iterator>
<script type="text/javascript" defer="defer">
initYulan();
</script>


</body>
</html>
<script>
function open1(url)
{
var r=parseInt(Math.random()*1000);
window.showModalDialog(url,window,'status:no;help:no;dialogHeight:360px; dialogWidth:450px');
}
function open2(url)
{
window.showModalDialog(url,window,'status:no;help:no;dialogHeight:900px; dialogWidth:930px');
}
</script>
